{% import 'macros.html' as mymacros %}
<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3>采购单预览</h3>
</div>
<div class="modal-body">
    <fieldset>
        <div class="col-md-4">
            <h4>系统编号</h4><p>{{obj.no}}&nbsp;</p>
            <h4>供应商</h4><p>{{obj.supplier|f}}&nbsp;</p>
            <h4>联系人</h4><p>{{obj.att|f}}&nbsp;</p>
            <h4>联系电话</h4><p>{{obj.tel|f}}&nbsp;</p>
            <h4>联系手机</h4><p>{{obj.mobile|f}}&nbsp;</p>
        </div>
        <div class="col-md-4">      
            <h4>采购日期</h4><p>{{obj.createTime|ft}}&nbsp;</p>
            <h4>经办人</h4><p>{{obj.createBy}}&nbsp;</p>
            <h4>备注</h4><p>{{obj.remark|f}}&nbsp;</p>
        </div>
        <div class="col-md-4">
            <h4>总金额</h4><p>{{obj.realAmount}}&nbsp;</p>
            <h4>附件</h4>
            <ul>
                {% for a in obj. attachment -%}
                    <li>{{mymacros.render_atm(a)}}</li>
                {%- endfor %}
            </ul>
        </div>      
        <table class="table table-bordered">
            <thead>
                <tr>
                    <td width='202px'>商品编号/名称</td>
                    <td>商品类型</td>
                    <td width='130px'>商品价钱</td>
                    <td width='130px'>采购价钱</td>
                    <td width='40px'>数量</td>
                    <td>备注</td>
                </tr>
            </thead>
            <tbody>
                {% for r in obj.dtls %}
                    <tr>
                        <td>{{mymacros.render_goto_popup_pdt(r.pdt, loop.first)}} {{ r.pdtname }}</td>
                        <td>{{r.pdttype|f}}</td>
                        <td>{{r.pdtpPrice|f}}</td>
                        <td>{{r.realPrice|f}}</td>
                        <td>{{r.qty}}</td>
                        <td>{{r.remark|f}}</td>
                    </tr>
                {% endfor %}
            </tbody>                
        </table>
   </fieldset>
</div>
<div class="modal-footer">
    <button type="button" data-dismiss="modal" class="btn btn-primary">{{BTN_CLOSE}}</button>
</div>